package Client;

import java.io.IOException;

public class ClientMainView {

    private ClientInitClose client;

    public  ClientMainView(ClientInitClose client) {
        this.client = client;
    }

    public void mainPage() throws IOException, ClassNotFoundException {
        while(true){
            System.out.println("----- 考试系统 -----");
            System.out.println("    1、学员系统");
            System.out.println("    2、管理员系统");
            System.out.println("    0、退出系统");
            int sc = ClientScanner.getScanner().nextInt();
            switch (sc){
                case 1:
                    System.out.println("正在进入学员系统...");
                    StudentSystem.studentLogin(client);
                    break;
                case 2:
                    System.out.println("正在进入管理员系统...");
                    ClientLogin.managerlogin(client);
                    break;
                case 0:
                    System.out.println("退出系统！");
                    return;
                default:
            }
        }
    }
}
